﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="ja">
<head>
<title>S_FileSaveAsの使用例</title>
<LINK REL="stylesheet" TYPE="text/css" HREF="../sakura.css">
<meta http-equiv="Content-type" content="text/html; charset=UTF-8">
</head>
<body>
<small>
Sakura-Editor Macro Reference
</small>
<h2>S_FileSaveAsの使用例</h2>

<pre>
<span style="color:green;">&#39; sample.vbs</span>
<span style="color:green;">&#39; "charset=Shift_JIS" を "charset=utf-8" に全置換してUTF8で保存</span>
<span style="color:blue;">ReplaceAll</span> <span style="color:blue;">CStr</span>(<span style="color:#800000;">"charset=Shift_JIS"</span>), <span style="color:blue;">CStr</span>(<span style="color:#800000;">"charset=utf-8"</span>), <span style="color:blue;">CLng</span>(<span style="color:red;">24</span>)
<span style="color:green;">&#39; 文字コード：UTF-8</span>
<span style="color:green;">&#39; 改行コード：変更しない</span>
<span style="color:blue;">FileSaveAs</span> <span style="color:blue;">CStr</span>(<span style="color:blue;">GetFileName</span>), <span style="color:blue;">CLng</span>(<span style="color:red;">4</span>), <span style="color:blue;">CLng</span>(<span style="color:red;">0</span>)
</pre>

<hr>
</body></html>
